There has hitherto been proposed a parking device that includes a parking gear, a detent lever, a parking pawl, a hydraulic unit, and a magnetic unit (see Patent Document 1, for example). In the parking device, the parking gear is attached to a rotary shaft of a transmission. The detent lever is formed in an L-shape having a first free end portion and a second free end portion, and turned about a supporting shaft. The parking pawl locks and unlocks the parking gear (rotary shaft of the transmission) in accordance with a turn of the detent lever. The hydraulic unit has a piston rod that moves in a first direction. The piston rod is moved toward one side in the first direction by the urging force of a spring to turn the detent lever to a first rotational position at which the rotary shaft of the transmission is locked. The piston rod is moved toward the other side in the first direction by a hydraulic pressure to turn the detent lever to a second rotational position at which the rotary shaft of the transmission is unlocked. Here, the piston rod is provided with a coupling recessed portion that extends from the distal end side to the base end side. The second free end portion of the detent lever is inserted into the coupling recessed portion. The second free end portion is provided with a long hole at a position to be in the coupling recessed portion. The piston rod and the detent lever are coupled to each other with the piston rod supporting a coupling pin inserted through the long hole of the detent lever. The magnetic unit has a lock shaft that moves in a second direction orthogonal to the first direction, and locks the lock shaft using a magnetic force to restrict movement of the piston rod when the distal end portion (abutment portion) of the lock shaft and a roller (contacted portion) supported by the piston rod abut against each other.